#include <stdlib.h>
#include <stdio.h>
#include "trans.h"


void libereTrans( trans_s **transition ){
	free( *transition );
	*transition = NULL;
}

trans_s* creerTransition( const int depart, const int arrivee, const char lettre ){
	trans_s* transition = (trans_s*) malloc( sizeof( trans_s ));
	if (transition == NULL){
	  fprintf(stderr, "Erreur lors d'allocation memoire\n");
	  exit(EXIT_FAILURE);
	}
	
	transition->depart = depart;
	transition->arrivee = arrivee;
	transition->etiquette = lettre;

	return transition;
}